package ciyuan.Entity.MagicTexture;// Made with Blockbench 3.9.3
// Exported for Minecraft version 1.15 - 1.16 with Mojang mappings
// Paste this class into your mod and generate all required imports


import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.renderer.entity.model.EntityModel;
import net.minecraft.client.renderer.model.ModelRenderer;

public class MagicTextureModel extends EntityModel<MagicTextureEntity> {
	private final ModelRenderer hexadecagon;
	private final ModelRenderer hexadecagon_r1;
	private final ModelRenderer hexadecagon_r2;
	private final ModelRenderer hexadecagon_r3;
	private final ModelRenderer hexadecagon_r4;
	private final ModelRenderer hexadecagon2;
	private final ModelRenderer hexadecagon_r5;
	private final ModelRenderer hexadecagon_r6;
	private final ModelRenderer hexadecagon_r7;
	private final ModelRenderer hexadecagon_r8;

	public MagicTextureModel() {
		texWidth = 496;
		texHeight = 496;

		hexadecagon = new ModelRenderer(this);
		hexadecagon.setPos(0.0F, 24.0F, 0.0F);
		hexadecagon.texOffs(330, 349).addBox(-12.75F, 0.0F, -64.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);
		hexadecagon.texOffs(55, 349).addBox(-12.75F, 0.0F, 62.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);
		hexadecagon.texOffs(220, 323).addBox(62.0F, 0.0F, -12.75F, 2.0F, 0.0F, 25.0F, 0.0F, false);
		hexadecagon.texOffs(55, 323).addBox(-64.0F, 0.0F, -12.75F, 2.0F, 0.0F, 25.0F, 0.0F, false);

		hexadecagon_r1 = new ModelRenderer(this);
		hexadecagon_r1.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon.addChild(hexadecagon_r1);
		setRotationAngle(hexadecagon_r1, 0.0F, -0.3927F, 0.0F);
		hexadecagon_r1.texOffs(0, 323).addBox(-64.0F, 0.0F, -12.75F, 2.0F, 0.0F, 25.0F, 0.0F, false);
		hexadecagon_r1.texOffs(165, 323).addBox(62.0F, 0.0F, -12.75F, 2.0F, 0.0F, 25.0F, 0.0F, false);
		hexadecagon_r1.texOffs(0, 349).addBox(-12.75F, 0.0F, 62.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);
		hexadecagon_r1.texOffs(275, 349).addBox(-12.75F, 0.0F, -64.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);

		hexadecagon_r2 = new ModelRenderer(this);
		hexadecagon_r2.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon.addChild(hexadecagon_r2);
		setRotationAngle(hexadecagon_r2, 0.0F, 0.3927F, 0.0F);
		hexadecagon_r2.texOffs(110, 323).addBox(-64.0F, 0.0F, -12.75F, 2.0F, 0.0F, 25.0F, 0.0F, false);
		hexadecagon_r2.texOffs(275, 323).addBox(62.0F, 0.0F, -12.75F, 2.0F, 0.0F, 25.0F, 0.0F, false);
		hexadecagon_r2.texOffs(110, 349).addBox(-12.75F, 0.0F, 62.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);
		hexadecagon_r2.texOffs(385, 349).addBox(-12.75F, 0.0F, -64.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);

		hexadecagon_r3 = new ModelRenderer(this);
		hexadecagon_r3.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon.addChild(hexadecagon_r3);
		setRotationAngle(hexadecagon_r3, 0.0F, -0.7854F, 0.0F);
		hexadecagon_r3.texOffs(330, 323).addBox(-12.75F, 0.0F, 62.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);
		hexadecagon_r3.texOffs(220, 349).addBox(-12.75F, 0.0F, -64.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);

		hexadecagon_r4 = new ModelRenderer(this);
		hexadecagon_r4.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon.addChild(hexadecagon_r4);
		setRotationAngle(hexadecagon_r4, 0.0F, 0.7854F, 0.0F);
		hexadecagon_r4.texOffs(165, 349).addBox(-12.75F, 0.0F, 62.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);
		hexadecagon_r4.texOffs(440, 349).addBox(-12.75F, 0.0F, -64.0F, 25.0F, 0.0F, 2.0F, 0.0F, false);

		hexadecagon2 = new ModelRenderer(this);
		hexadecagon2.setPos(0.0F, 24.0F, 0.0F);
		hexadecagon2.texOffs(0, 0).addBox(-10.0F, 0.0F, -50.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);
		hexadecagon2.texOffs(0, 0).addBox(-10.0F, 0.0F, 45.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);
		hexadecagon2.texOffs(0, 0).addBox(45.0F, 0.0F, -10.0F, 5.0F, 0.0F, 20.0F, 0.0F, false);
		hexadecagon2.texOffs(0, 0).addBox(-50.0F, 0.0F, -10.0F, 5.0F, 0.0F, 20.0F, 0.0F, false);

		hexadecagon_r5 = new ModelRenderer(this);
		hexadecagon_r5.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon2.addChild(hexadecagon_r5);
		setRotationAngle(hexadecagon_r5, 0.0F, -0.3927F, 0.0F);
		hexadecagon_r5.texOffs(0, 0).addBox(-50.0F, 0.0F, -10.0F, 5.0F, 0.0F, 20.0F, 0.0F, false);
		hexadecagon_r5.texOffs(0, 0).addBox(45.0F, 0.0F, -10.0F, 5.0F, 0.0F, 20.0F, 0.0F, false);
		hexadecagon_r5.texOffs(0, 0).addBox(-10.0F, 0.0F, 45.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);
		hexadecagon_r5.texOffs(0, 0).addBox(-10.0F, 0.0F, -50.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);

		hexadecagon_r6 = new ModelRenderer(this);
		hexadecagon_r6.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon2.addChild(hexadecagon_r6);
		setRotationAngle(hexadecagon_r6, 0.0F, 0.3927F, 0.0F);
		hexadecagon_r6.texOffs(0, 0).addBox(-50.0F, 0.0F, -10.0F, 5.0F, 0.0F, 20.0F, 0.0F, false);
		hexadecagon_r6.texOffs(0, 0).addBox(45.0F, 0.0F, -10.0F, 5.0F, 0.0F, 20.0F, 0.0F, false);
		hexadecagon_r6.texOffs(0, 0).addBox(-10.0F, 0.0F, 45.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);
		hexadecagon_r6.texOffs(0, 0).addBox(-10.0F, 0.0F, -50.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);

		hexadecagon_r7 = new ModelRenderer(this);
		hexadecagon_r7.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon2.addChild(hexadecagon_r7);
		setRotationAngle(hexadecagon_r7, 0.0F, -0.7854F, 0.0F);
		hexadecagon_r7.texOffs(0, 0).addBox(-10.0F, 0.0F, 45.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);
		hexadecagon_r7.texOffs(0, 0).addBox(-10.0F, 0.0F, -50.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);

		hexadecagon_r8 = new ModelRenderer(this);
		hexadecagon_r8.setPos(0.0F, 0.0F, 0.0F);
		hexadecagon2.addChild(hexadecagon_r8);
		setRotationAngle(hexadecagon_r8, 0.0F, 0.7854F, 0.0F);
		hexadecagon_r8.texOffs(0, 0).addBox(-10.0F, 0.0F, 45.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);
		hexadecagon_r8.texOffs(0, 0).addBox(-10.0F, 0.0F, -50.0F, 20.0F, 0.0F, 5.0F, 0.0F, false);
	}

	@Override
	public void setupAnim(MagicTextureEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){
		//previously the render function, render code was moved to a method below
	}

	@Override
	public void renderToBuffer(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
		hexadecagon.render(matrixStack, buffer, packedLight, packedOverlay);
		hexadecagon2.render(matrixStack, buffer, packedLight, packedOverlay);
	}

	public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
		modelRenderer.xRot = x;
		modelRenderer.yRot = y;
		modelRenderer.zRot = z;
	}
}